#ifndef __ANO_PC_H__
#define __ANO_PC_H__

#include "stm32f4xx_conf.h"
#include "sys.h"
#include "delay.h"




#define BYTE0(dwTemp)       ( *( (char *)(&dwTemp) + 0) )
#define BYTE1(dwTemp)       ( *( (char *)(&dwTemp) + 1) )
#define BYTE2(dwTemp)       ( *( (char *)(&dwTemp) + 2) )
#define BYTE3(dwTemp)       ( *( (char *)(&dwTemp) + 3) )
#define ABS(x)	( (x>0) ? (x) : (-x) )

#define ANO_rx_buf_num 50
#define ANO_Tx_buf_num 20

#define PAR_PID_1_P		1
#define PAR_PID_1_I		2
#define PAR_PID_1_D		3
#define PAR_PID_2_P		4
#define PAR_PID_2_I		5
#define PAR_PID_2_D		6
#define PAR_PID_3_P		7
#define PAR_PID_3_I		8
#define PAR_PID_3_D		9
#define PAR_PID_4_P		10
#define PAR_PID_4_I		11
#define PAR_PID_4_D		12
#define PAR_PID_5_P		13
#define PAR_PID_5_I		14
#define PAR_PID_5_D		15
#define PAR_PID_6_P		16
#define PAR_PID_6_I		17
#define PAR_PID_6_D		18
#define PAR_PID_7_P		19
#define PAR_PID_7_I		20
#define PAR_PID_7_D		21
#define PAR_PID_8_P		22
#define PAR_PID_8_I		23
#define PAR_PID_8_D		24
#define PAR_PID_9_P		25
#define PAR_PID_9_I		26
#define PAR_PID_9_D		27
#define PAR_PID_10_P		28
#define PAR_PID_10_I		29
#define PAR_PID_10_D		30
#define PAR_PID_11_P		31
#define PAR_PID_11_I		32
#define PAR_PID_11_D		33
#define PAR_PID_12_P		34
#define PAR_PID_12_I		35
#define PAR_PID_12_D		36
#define PAR_PID_13_P		37
#define PAR_PID_13_I		38
#define PAR_PID_13_D		39
#define PAR_PID_14_P		40
#define PAR_PID_14_I		41
#define PAR_PID_14_D		42
#define PAR_PID_15_P		43
#define PAR_PID_15_I		44
#define PAR_PID_15_D		45
#define PAR_PID_16_P		46
#define PAR_PID_16_I		47
#define PAR_PID_16_D		48
#define PAR_PID_17_P		49
#define PAR_PID_17_I		50
#define PAR_PID_17_D		51
#define PAR_PID_18_P		52
#define PAR_PID_18_I		53
#define PAR_PID_18_D		54

#define PAR_RCINMODE		61
#define PAR_UNLOCKPWM		62
#define PAR_LVWARN			63
#define PAR_LVRETN			64
#define PAR_LVDOWN			65
#define PAR_CENPOSX			66
#define PAR_CENPOSY			67
#define PAR_CENPOSZ			68
#define PAR_TAKEOFFHIGH		69
#define PAR_TAKEOFFSPEED	70
#define PAR_LANDSPEED		71
#define PAR_HEATSWITCH		72




extern uint8_t ANO_Tx_buf[20];
extern uint8_t ANO_Tx_cnt;

extern uint8_t ANO_Rx_buf[ANO_rx_buf_num];
extern uint8_t ANO_Rx_cnt;


void ANO_Send_Data(int16_t data);
void ANO_PC_Task(void);

#endif







